'use strict';

describe('Filter: mailingAddress', function() {

  // load the filter's module
  beforeEach(module('webappApp'));

  // initialize a new instance of the filter before each test
  var mailingAddress;
  beforeEach(inject(function($filter) {
    mailingAddress = $filter('mailingAddress');
  }));

  it('should return the mailing address', function() {
    var address = {
      address: '123 Fake St',
      city: 'Testylvania',
      state: 'ST',
      country: 'Testinican Replublic',
      zipcode: '01234'
    };
    expect(mailingAddress(address)).toBe('123 Fake St, Testylvania ST');
  });

  it('should return undefined if the address is undefined', function() {
    expect(mailingAddress(undefined)).toBeUndefined();
  });
});